#if !defined(AFX_HeaderEx_H__82B1B7B2_03F2_42FC_8EC9_5A5CC290B77C__INCLUDED_)
#define AFX_HeaderEx_H__82B1B7B2_03F2_42FC_8EC9_5A5CC290B77C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HeaderEx.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CHeaderEx window

class CHeaderEx : public CHeaderCtrl
{
private:
	HIMAGELIST m_hIml;

public:
	typedef enum
	{
		ColumnType_NULL = -1,
		ColumnType_Text = 0,
		ColumnType_Numeric = 1,
		ColumnType_DateTime = 2,
		
	} ColumnTypeEnum;
// Construction
public:
	CHeaderEx();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHeaderEx)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetColType(int nCol, ColumnTypeEnum eColType);
	void SetSortStatus(int nSortCol, BOOL bSortAsc, BOOL bRedrawNow = TRUE);
	BOOL GetSortAsc();
	int GetSortCol();
	virtual ~CHeaderEx();

	// Generated message map functions
protected:
	CArray<int, int> m_arrColType;
	BOOL m_bSortAsc;
	int m_nSortCol;
	//{{AFX_MSG(CHeaderEx)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT *pResult);
	afx_msg void OnItemRClick(NMHDR* pNMHDR, LRESULT *pResult);
	DECLARE_MESSAGE_MAP()
};

typedef struct tagListViewSortInfo
{
	CListCtrl *pList;
	CHeaderEx *pHeader;
} ListViewSortInfo;

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_HeaderEx_H__82B1B7B2_03F2_42FC_8EC9_5A5CC290B77C__INCLUDED_)
